/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * A server thread listening on the PingPort. Does nothing but accept the connection so that the FEServer can time how long the connection took.
 * @author BrandonNeal
 */
public class PingListener extends Thread {
    
    
    public PingListener()
    {
        this.start();
    }
    
    @Override
    public void run()
    {
        try 
        {
            ServerSocket listenSocket = new ServerSocket(Server.PingPort);
            while(true)
            {
                listenSocket.accept(); //Listen for connections
            }
        }
        catch (IOException ex) 
        {
            Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
}
